package org.thanos.demo.producer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;
import org.thanos.demo.constant.Topic;

@Component
public class DemoKafkaProducer {

    @Autowired
    private KafkaTemplate kafkaTemplate;

    public void publish(String message){
        kafkaTemplate.send(Topic.DEMO, message);
    }
}
